﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LotteryVote.Data;
using LotteryVote.Entity;

namespace LotteryVote.Logic
{
    public class CompanyTypeFacade
    {
        private CompanyTypeDataAccess _daCompanyType;
        internal CompanyTypeDataAccess DACompanyType
        {
            get
            {
                if (_daCompanyType == null)
                    _daCompanyType = new CompanyTypeDataAccess();
                return _daCompanyType;
            }
            set
            {
                _daCompanyType = value;
            }
        }

        public CompanyTypeModel GetCompanyTypeByCompanyId(int companyId)
        {
            return DACompanyType.GetCompanyTypeByCompany(companyId);
        }
        public CompanyTypeModel GetCompanyType(int typeId)
        {
            return DACompanyType.GetCompanyType(typeId);
        }
        public CompanyTypeModel GetCompanyType(string typeName)
        {
            return DACompanyType.GetCompanyType(typeName);
        }
        public IList<CompanyTypeModel> GetAllType()
        {
            return DACompanyType.GetAllCompanyType();
        }
    }
}
